//获取品牌管理数据
import request from '@/utils/request'
// GET /admin/product/baseTrademark/{page}/{limit}
//获取品牌列表
export const reqTradeMarkList = (page,limit)=>{
  return request({
    url:`/admin/product/baseTrademark/${page}/${limit}`,
    method:'get'
  })
}
//添加品牌
export const reqAddOrUpdateTradeMark = (tradeMark)=>{
  if (tradeMark.id){
    //代表修改
    return request({
      url:`/admin/product/baseTrademark/update`,
      data:tradeMark,
      method:'PUT'
    })
  }else {
    //新增
    return request({
      url:`/admin/product/baseTrademark/save`,
      data:tradeMark,
      method:'POST'
    })
  }
}
//删除品牌
export const reqDeleteTradeMark = (id)=>{
  return request({
    url:`/admin/product/baseTrademark/remove/${id}`,
    method:'DELETE'
  })
}
